package com.initialize.pub.generate.dao;

import com.initialize.pub.generate.pojo.VSearch;
import com.initialize.pub.generate.pojo.VSearchExample;
import java.util.List;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface VSearchMapper {
    @SelectProvider(type=VSearchSqlProvider.class, method="countByExample")
    long countByExample(VSearchExample example);

    @DeleteProvider(type=VSearchSqlProvider.class, method="deleteByExample")
    int deleteByExample(VSearchExample example);

    @Insert({
        "insert into v_search (aid, title, ",
        "label, classification, ",
        "release_time, update_time, ",
        "browse_the_number, thumb_up_number, ",
        "status, content)",
        "values (#{aid,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, ",
        "#{label,jdbcType=VARCHAR}, #{classification,jdbcType=VARCHAR}, ",
        "#{releaseTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{browseTheNumber,jdbcType=INTEGER}, #{thumbUpNumber,jdbcType=INTEGER}, ",
        "#{status,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})"
    })
    int insert(VSearch record);

    @InsertProvider(type=VSearchSqlProvider.class, method="insertSelective")
    int insertSelective(VSearch record);

    @SelectProvider(type=VSearchSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="aid", property="aid", jdbcType=JdbcType.INTEGER),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="label", property="label", jdbcType=JdbcType.VARCHAR),
        @Result(column="classification", property="classification", jdbcType=JdbcType.VARCHAR),
        @Result(column="release_time", property="releaseTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="browse_the_number", property="browseTheNumber", jdbcType=JdbcType.INTEGER),
        @Result(column="thumb_up_number", property="thumbUpNumber", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<VSearch> selectByExampleWithBLOBs(VSearchExample example);

    @SelectProvider(type=VSearchSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="aid", property="aid", jdbcType=JdbcType.INTEGER),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="label", property="label", jdbcType=JdbcType.VARCHAR),
        @Result(column="classification", property="classification", jdbcType=JdbcType.VARCHAR),
        @Result(column="release_time", property="releaseTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="browse_the_number", property="browseTheNumber", jdbcType=JdbcType.INTEGER),
        @Result(column="thumb_up_number", property="thumbUpNumber", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER)
    })
    List<VSearch> selectByExample(VSearchExample example);

    @UpdateProvider(type=VSearchSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") VSearch record, @Param("example") VSearchExample example);

    @UpdateProvider(type=VSearchSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") VSearch record, @Param("example") VSearchExample example);

    @UpdateProvider(type=VSearchSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") VSearch record, @Param("example") VSearchExample example);
}